Database systems are commonly employed by organizations for storing large amounts of data for easy and fast access. Accordingly, database systems are required to be reliable and scalable. In addressing the high reliability requirement, HADR database systems provide for a replication scheme by protecting against data loss in the event of a hardware or software failure. In particular, HADR database systems can replicate data changes from a source database, referred to as a primary database, to a target database, referred to as a standby database. In order for data replication to occur, the primary and standby databases are synchronized, and log data is shipped from the primary database to local log files on the standby database. Thus, the standby database can replace the primary database without a loss of data when the primary database experiences partial or complete failure during operation.
A database can be scaled by dividing the database into partitions, or nodes. Each database partition consists of its own data, indexes, configuration files, and transaction logs. Database partitioning can occur within a single server or across a cluster of servers, where partitions can be located on different database servers.
One such partitioning arrangement is referred to as Database Partitioning Feature (DPF), which provides a great deal of flexibility for physically or logically partitioning databases. For example, a database organization scheme can be employed in which table data is divided by DPF across multiple DPF partitions. Each table row is distributed to a database partition. When a query is processed, the request is divided so each database partition processes the table rows it is responsible for. The ability to divide a table across multiple storage objects using DPF permits the size of the table to be increased, resulting in greater scalability of a database system.
When an HADR database configuration includes a DPF environment, a primary database is divided into a plurality of primary partitions and a standby database divided into a plurality of standby partitions. Each database partition can have its own set of computing resources, including a processor such as a CPU and storage. Each primary partition, also referred to as an active partition, is configured for pairing with a standby partition. Thus, the primary partitions can be synchronized with their corresponding standby partitions, whereby log data is shipped to the corresponding standby partitions, such that the partitioned standby database can replace the primary database in a takeover operation.